"""
Sample requests:

curl -v http://127.0.0.1:8000/creatures | jq
"""

from data import get_creatures
from fastapi import FastAPI
from model import Creature

app = FastAPI()


@app.get("/creatures")
def get_list() -> list[Creature]:
    return get_creatures()


if __name__ == "__main__":
    import uvicorn

    uvicorn.run("web:app", reload=True)
